package com.fzkjjt.storage;

import com.fzkjjt.config.SeataFilter;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;
import org.springframework.core.io.ClassPathResource;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @program: seata-simple
 * @description:
 * @author: FangZhen
 * @create: 2020-10-14 15:56
 **/
@SpringBootApplication
@Import({SeataFilter.class})
public class StorageApplication {

    public static void main(String[] args) throws IOException {
        String fileName = "application-storage.properties";
        ClassPathResource classPathResource = new ClassPathResource(fileName);
        InputStream inputStream = classPathResource.getInputStream();
        Properties properties = new Properties();
        properties.load(inputStream);

        SpringApplication springApplication = new SpringApplication(StorageApplication.class);
        springApplication.setDefaultProperties(properties);
        springApplication.run(args);
    }
}
